/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package edu.wpi.first.wpilibj.TessBot.commands;

import edu.wpi.first.wpilibj.DigitalInput;
import edu.wpi.first.wpilibj.DriverStationLCD;

/**
 *
 * @author programmer
 */
public class Drive extends CommandBase {
   private DigitalInput lightsensor1 = new DigitalInput(1);
    //private DigitalInput lightsensor2 = new DigitalInput(2);
    //private DigitalInput lightsensor3 = new DigitalInput(3);
    //private DigitalInput lightsensor4 = new DigitalInput(4);
   
 
    public Drive(){
        requires(drivetrain);
    }
    
    
    protected void initialize() {
        drivetrain.tankdrive(0,0);
    }

    protected void execute() {
      
      /*  if(lightsensor1.get()!=true)
            drivetrain.tankdrive(0,0);
        else        
        
         if(lightsensor2.get()!=true)
            drivetrain.tankdrive(0,0);
        else
        
        if(lightsensor3.get()!=true)
            drivetrain.tankdrive(0,0);
        else
        
        if(lightsensor4.get()!=true)
            drivetrain.tankdrive(0,0);
        else
        
        
    */
        drivetrain.tankdrive(oi.Nightwing(), oi.Robin());
        DriverStationLCD.getInstance().println(DriverStationLCD.Line.kUser1, 1, ""+lightsensor1.get());
        DriverStationLCD.getInstance().updateLCD();
        
     /*   DriverStationLCD.getInstance().println(DriverStationLCD.Line.kUser2, 2, ""+lightsensor2.get());
        DriverStationLCD.getInstance().updateLCD();
        
        DriverStationLCD.getInstance().println(DriverStationLCD.Line.kUser3, 3, ""+lightsensor3.get());
        DriverStationLCD.getInstance().updateLCD();
        
        DriverStationLCD.getInstance().println(DriverStationLCD.Line.kUser4, 4, ""+lightsensor4.get());
        DriverStationLCD.getInstance().updateLCD();
        */
        
        System.out.println(oi.Nightwing());
        System.out.println(oi.Robin());
        
    }

    protected boolean isFinished() {
        return false; 
    }

    protected void end() {
    }

    protected void interrupted() {
    }
    
}
